{% extends "documents/manage/base.html" %}
{% load i18n %}

{% block block_title %} Document list {% endblock %}

{% block block_content %}
<div class="block">

    <div class="block_head">
        <div class="bheadl"></div>
        <div class="bheadr"></div>
        <h2>{% trans 'Document list' %}</h2>
    </div>		<!-- .block_head ends -->

    <div class="block_content">

        {% if documents|length %}
        <form action="" method="post">

            <table cellpadding="0" cellspacing="0" width="100%" class="sortable">

                <thead>
                    <tr>
                        <th width="10"><input type="checkbox" class="check_all" /></th>
                        <th>{% trans 'Title' %}</th>
                        <th>{% trans 'Program' %}</th>
                        <th>{% trans 'Topic' %}</th>
                        <th>{% trans 'Date created' %}</th>
                        <th>{% trans 'Author' %}</th>
                        <td>&nbsp;</td>
                    </tr>
                </thead>

                <tbody>
                {% for doc in documents %}
                    <tr>
                        <td>
                            <input type="checkbox" value="{{ doc.id }}" />
                        </td>
                        <td>
                            <a href="#">{{ doc.title }}</a>
                        </td>
                        <td>{{ doc.program.title }}</td>
                        <td>{{ doc.topic.title }}</td>
                        <td>
                            <a href="#">{{ doc.created }}</a>
                        </td>
                        <td>
                            <a href="#">{{ doc.owner.username }}</a>
                        </td>
                        <td class="delete">
                            <a href="#">{%  trans 'Delete' %}</a>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>

            <div class="tableactions">
                <select>
                    <option>Actions</option>
                    <option>Delete</option>
                </select>

                <input type="submit" class="submit tiny" value="Apply to selected" />
            </div>		<!-- .tableactions ends -->

            <div class="pagination right">
                <a href="#">&laquo;</a>
                <a href="#" class="active">1</a>
                <a href="#">2</a>
                <a href="#">3</a>
                <a href="#">4</a>
                <a href="#">5</a>
                <a href="#">6</a>
                <a href="#">&raquo;</a>
            </div>		<!-- .pagination ends -->

        </form>
        {% else %}
            {% trans 'No documents found' %}
        {% endif %}

    </div>		<!-- .block_content ends -->

    <div class="bendl"></div>
    <div class="bendr"></div>

</div>		<!-- .block ends -->
{% endblock %}
